*Replication do-file for 'The policy agenda effects of problem indicators - A comparative study in seven countries'

*Panel structure
xtset panelid year

*Table 3 Model 1
xtreg d.cap_ l.cap_ l.indicator_rescaled d.indicator_rescaled d.gov_single l.gov_single d.election_year l.election_year if in_model==1, fe robust cluster(double_cluster)

*Table 3 Model 2
xtreg d.cap_ l.cap_ l.benchmark d.benchmark d.election_year l.election_year d.gov_single l.gov_single if  in_model_benchmark==1, fe robust cluster(double_cluster)

*Table 3 Model 3
xtreg d.cap_ l.cap_ l.indicator_rescaled d.indicator_rescaled d.benchmark l.benchmark d.election_year l.election_year d.gov_single l.gov_single if in_model_benchmark==1, fe robust cluster(double_cluster)

*Figure 1 Regression results (testing for negativity bias in changes)
xtreg cap_ l.cap_ c.indicator_rescaled_change##i.negative_change indicator_rescaled_lag d.election_year l.election_year d.gov_single l.gov_single if in_model==1, fe robust cluster(double_cluster)
	
*Table SI3 Regression results (negativity bias in benchmark)
xtreg d.cap_ cap_lag c.benchmark_lag##i.negative_benchmark d.benchmark d.election_year l.election_year d.gov_single l.gov_single if in_model_benchmark==1, fe robust cluster(double_cluster)


order country country_name issue panelid year  cap_ cap_lag indicator_ indicator_rescaled indicator_rescaled_lag indicator_rescaled_change negative_change benchmark negative_benchmark benchmark_lag benchmark_change election_year gov_single number_people intensity_effect obtrusive concrete valence solubility logindicator logindicator_change benchmark_logindicator benchmark_logindicator_change double_cluster in_model in_model_benchmark, first

use "C:\Users\az54851\Dropbox\Thomas og Henrik\JPP\Dataverse\Dataset.dta"
drop if topic3!=1

keep in_model year cap_ cap_lag panelid indicator_ negative_change2 negative_benchmark indicator_rescaled indicator_rescaled_lag indicator_rescaled_change avg_difference2 gov_single election_year double_cluster country topic country_name election_year obtrusive number_people valence concrete solubility intensity_effect logindicator logindicator_change average_logindicator ncou_indicator ncou_indicator2 avg_difference2_lag

clear

drop ncou_indicator ncou_indicator2

rename avg_difference2 benchmark
rename avg_difference2_lag benchmark_lag
rename negative_change2 negative_change
rename topic issue
rename average_logindicator benchmark_logindicator

replace issue = "pharmaceutical expenditure" if issue == "drugregulation"

bysort country issue (year): gen benchmark_change = (benchmark-benchmark[_n-1])
bysort country issue (year): gen benchmark_logindicator_change = (benchmark_logindicator-benchmark_logindicator[_n-1])